package java8_6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class SuiJiBiDaXiao {
    public static void main(String[] args) {
        Scanner i = new Scanner(System.in);

        int a = (int) (Math.random() * 100);
        int b = 0;
        do {
            //b一开始是0，没有再次赋值，b一直0
            System.out.println("请输入你的猜测：");
            b = i.nextInt();//！！！！！！！！！！！
            if (a < b) {
                System.out.println("太大了");
            } else if (a > b) {
                System.out.println("太小了");
            } else{
                System.out.println("猜对了");
            }
        } while (a != b);
    }
}

